<?php defined( '_VALID_MOS' ) or die( include_once("../../404.php") );
$sql = "SELECT `Id`, `gallery_type_id`, `title`, `description`, `width`, `height`, `image_file`, `date_add`, `status`, `order`
		FROM `gallery` WHERE `Status` = 1 AND gallery_type_id = ? ORDER BY `Order` DESC"; 
$cmd = $mysqli->prepare($sql);
$cmd->bind_param("s", $_GET["alias"]);
$cmd->execute() or die($mysqli->error);
$cmd->bind_result($Id, $gallery_type_id, $title, $description, $width, $height, $image_file, $date_add, $status, $order);
$cmd->store_result();
$i = 1;
?>
<div id="box_thuvienanh">
	<div id="sub_box_thuvienanh">
		<div class="bg_tt_right"><div class="bg_tt_left"><div class="bg_tt"><div class="text_tt">THƯ VIỆN ẢNH</div></div></div></div>
		<div id="sub_box_thuvienanh1">
			<div class="ct_right">
				<div class="ct_left">
					<div class="ct">
						
						<div class="wrapper">
						<script type="text/javascript" src="javascript/rokbox.js"></script>
						<script type="text/javascript" src="javascript/rokbox-config.js"></script>
						
							<?php while($cmd->fetch()){ ?>

								<div class="demo">
									<a href="<?php echo $image_file; ?>" rel="rokbox[<?php echo $width ." ". $height; ?>](demo)" title="<?php echo $title; ?> :: <?php echo $description; ?>"><img src="<?php echo $image_file; ?>" width="200" height="125" alt="" /></a>
									<div class="galerytitledetail"><?php echo $title; ?></div>
								</div>
								<?php if($i%3==0){echo "<div style=\"border-bottom:1px dotted #ccc; margin: 5px 0 10px 0;\" class=\"clear\"></div>";}?>
										
							<?php $i++; } ?>
								</tr>
						</table>
							<div class="clear"></div>
						
						</div>
						
					</div>
				</div>
			</div>
			<div class="bg_bt_right"><div class="bg_bt_left"><div class="bg_bt"><div class="text_bt">&nbsp;</div></div></div></div>
		</div>
	</div>
	<div class="clear"></div>
</div>